<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <script>
        function myFunction() {
            alert("你好，我是一个警告框！");
        }
    </script>
</head>

<body>

    <input type="button" onclick="myFunction()" value="显示警告框" />

</body>

</html>